﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AJWPFAdmin.Services.Migrations
{
    /// <inheritdoc />
    public partial class addEmiRiseRecord : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "EmiRiseRecords",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    CarNo = table.Column<string>(type: "varchar(120)", maxLength: 120, nullable: false, comment: "车牌号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OverproofVerifyResult = table.Column<int>(type: "int", nullable: false, comment: "超标核实结果"),
                    ExceedInfo = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "超标原因")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExceedFlag = table.Column<int>(type: "int", nullable: false, comment: "是否解除超标排放"),
                    StartTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "下发时间"),
                    EndTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "解除时间"),
                    Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Synchronized = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否已同步"),
                    PId = table.Column<int>(type: "int", nullable: false),
                    CreateDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    UpdateDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EmiRiseRecords", x => x.Id);
                },
                comment: "排放超标表")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480306L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480307L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480308L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480309L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480310L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480311L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "PlatformCustomers",
                keyColumn: "Id",
                keyValue: 480306,
                columns: new[] { "CreateDate", "ExpireDate" },
                values: new object[] { new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820), new DateTime(2025, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820) });

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)6,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1000,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1001,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1002,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1003,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1004,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1005,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(5337));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(5353));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(5362));

            migrationBuilder.UpdateData(
                table: "SystemRoles",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820), new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820) });

            migrationBuilder.UpdateData(
                table: "SystemUsers",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820), new DateTime(2024, 11, 8, 17, 36, 1, 944, DateTimeKind.Local).AddTicks(2820) });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "EmiRiseRecords");

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480306L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480307L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480308L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480309L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480310L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "CarTypes",
                keyColumn: "Id",
                keyValue: 480311L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "PlatformCustomers",
                keyColumn: "Id",
                keyValue: 480306,
                columns: new[] { "CreateDate", "ExpireDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2025, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)6,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1000,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1001,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1002,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1003,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1004,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemConfigDictionaries",
                keyColumn: "Key",
                keyValue: (short)1005,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 1L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6261));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 2L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6281));

            migrationBuilder.UpdateData(
                table: "SystemDictionaries",
                keyColumn: "Id",
                keyValue: 3L,
                column: "CreateDate",
                value: new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(6290));

            migrationBuilder.UpdateData(
                table: "SystemRoles",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });

            migrationBuilder.UpdateData(
                table: "SystemUsers",
                keyColumn: "Id",
                keyValue: 480306L,
                columns: new[] { "CreateDate", "UpdateDate" },
                values: new object[] { new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714), new DateTime(2024, 11, 5, 17, 53, 46, 862, DateTimeKind.Local).AddTicks(3714) });
        }
    }
}
